#include <vector>
#include <string>
#include <algorithm>
#include <stdexcept>
#include <iterator>
struct vec3d {
    double x;
    double y;
    double z;

    bool operator==(const vec3d& right) const {
        return ( x == right.x && y == right.y && z == right.z );
    }
};

typedef vec3d Area_size;

struct Molecule {
    vec3d pos;
    vec3d speed;
    vec3d accel;
};

typedef std::vector<Molecule> Molecules_vector;

struct Cell {
    int begin;
    int end;

    vec3d left_border;
    vec3d right_border;
};

typedef std::vector<Cell> Cells;

bool Is_inCell( Cell& cell, Molecule& mol );

struct Split_area {
    Molecules_vector mol_vector;
    Cells cells;

    Split_area( Area_size area, double split_range );
};

Split_area CreateSplitArea(Area_size area, Molecules_vector& mol_vector);
